The present invention relates to computer systems. More specifically, the invention relates to providing requests for connections to a resource that implicitly utilize a connection cache.
In computer systems, it is common for an application to obtain a connection to a desired resource. An application programming interface (API) can define the calls that obtain a connection, access the resource, close a connection, and the like. For example, the Java database connectivity (JDBC) is an API that allows Java applications to connect and access databases.
Establishing a connection and closing a connection can take unwanted time and processing capability. Accordingly, it is known to pool connections in a connection cache. When an application wants a connection from the cache, a request for a connection from the cache is sent and fulfilled with a connection from the cache (or a new connection). When that application is finished with the connection, the application closes the connection and the connection is returned to the cache. Thus, if another application (or the same one at a later point in time) requests a connection from the cache, the connection can be readily been given from the cache, if available.
Currently, JDBC driver vendors implement a different datasource (abstractions to the resource) for connection caching. In other words, to access the same resource, one may need to make one API call to get a connection where connection caching is not being used and a different API call to get a connection where connection caching is being used.
Problems with this implementation is that there are more datasources than required, which can become confusing. Additionally, a client needs to know if connection caching is being utilized in order to make the correct API call.
Accordingly, it would be desirable to have innovative techniques of connection caching. Additionally, it would be beneficial to have techniques that allow connection caching to be transparent to the client.